<template>
    <div>
        <van-nav-bar
                title="今日秒杀"
                @click-left="leftButton"
                left-arrow
        />

        <van-tabs v-model="active" swipeable @click="tabClick">
            <van-tab title="进行中">
            </van-tab>
            <van-tab title="即将开始">
            </van-tab>
        </van-tabs>

        <div>
            <van-card
                    price="8699.00"
                    desc="强大的A13X中央处理器"
                    title="iPad Pro 2020"
                    thumb="https://img.yzcdn.cn/vant/ipad.jpeg"
                    @click="goToGoods"
            >
            </van-card>
            <van-card
                    price="8699.00"
                    desc="强大的A13X中央处理器"
                    title="iPad Pro 2020"
                    thumb="https://img.yzcdn.cn/vant/ipad.jpeg"
                    @click="goToGoods"
            >
            </van-card>
            <van-card
                    price="8699.00"
                    desc="强大的A13X中央处理器"
                    title="iPad Pro 2020"
                    thumb="https://img.yzcdn.cn/vant/ipad.jpeg"
                    @click="goToGoods"
            >
            </van-card>
            <van-card
                    price="8699.00"
                    desc="强大的A13X中央处理器"
                    title="iPad Pro 2020"
                    thumb="https://img.yzcdn.cn/vant/ipad.jpeg"
                    @click="goToGoods"
            >
            </van-card>
        </div>
    </div>
</template>

<script>
    export default {
        name: "SecKill",
        data() {
            return {
                active: true
            }
        }, methods: {
            leftButton() {
                this.$router.back()
            }, tabClick(item) {
                console.log(item)
            }, goToGoods() {
                this.$router.push({path: '/goods'});
            }
        }
    }
</script>

<style scoped>
    .my-swipe .van-swipe-item {
        color: #fff;
        font-size: 20px;
        line-height: 150px;
        text-align: center;
        background-color: #39a9ed;
    }
</style>
